﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Drawing;

namespace framework.map
{
    class CurveLivePreview
    {
        public static PointF[] getRadii(float ir, int n, float ba, float ea)
        {
            PointF[] inners = new PointF[n];
            float slice = (ea - ba) / (float)n;
            for (int i = 0; i < n; i++)
            {
                inners[i].X = (float) Math.Cos((float)i * slice) * ir;
                inners[i].Y = (float) Math.Sin((float)i * slice) * ir;
            }
            return inners;
        }

        public static PointF[] getOuters(float or, int n, float ba, float ea)
        {
            PointF[] outers = new PointF[n];
            float slice = (ea - ba) / (float)n;
            for (int i = 0; i < n; i++)
            {
                outers[i].X = (float) Math.Cos((float)i * slice) * or;
                outers[i].Y = (float) Math.Sin((float)i * slice) * or;
            }
            return outers;
        }
    }
}
